package cn.tank.dao;

import cn.tank.pojo.Resume;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * @Author: ZLY
 * @Date: 2020/10/29 20:41
 * @Description:
 */
public interface ResumeDao extends JpaRepository<Resume,Long>, JpaSpecificationExecutor<Resume> {
    @Query("from Resume where id=?1 and name=?2")
    public Resume findByJpql(Long id,String name);

    @Query(value = "select * from tb_resume where address like ?1",nativeQuery = true)
    public Resume findBySql(String address);

    public Resume findByNameLikeAndAddress(String name,String addres);
}
